package org.nfyszny.zzzs.modules.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.nfyszny.zzzs.modules.entity.ZzzsRecordOfSupplyAbility;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @Description: 供货能力备案
 * @Author: jeecg-boot
 * @Date: 2022-11-11
 * @Version: V1.0
 */
public interface IZzzsRecordOfSupplyAbilityService extends IService<ZzzsRecordOfSupplyAbility> {
    Map<String, Object> getStateAbility(String productId);

    /**
     * 根据产品id查询
     *
     * @param queryWrapper
     * @param page
     * @return
     */
    IPage<ZzzsRecordOfSupplyAbility> getListByProductId(QueryWrapper<ZzzsRecordOfSupplyAbility> queryWrapper, Page<ZzzsRecordOfSupplyAbility> page);

    /**
     * 保存供货能力信息
     *
     * @param zzzsRecordOfSupplyAbility
     */
    void saveRecordOfSupplyAbility(ZzzsRecordOfSupplyAbility zzzsRecordOfSupplyAbility);


    /**
     * 提交供货能力备案
     *
     * @param zzzsRecordOfSupplyAbility
     */
    void submitRecord(ZzzsRecordOfSupplyAbility zzzsRecordOfSupplyAbility);

    /**
     * 更改备案信息
     *
     * @param zzzsRecordOfSupplyAbility
     */
    void change(ZzzsRecordOfSupplyAbility zzzsRecordOfSupplyAbility);

    @Transactional
    void review(ZzzsRecordOfSupplyAbility zzzsRecordOfSupplyAbility);

    /**
     * 查询已备案的备案信息
     *
     * @param id
     * @return
     */
    ZzzsRecordOfSupplyAbility getHaveInfoById(String id);
}
